package com.loong.java.json.regex;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import scala.Tuple4;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by 梁浩峰 on 2016/9/14 17:32.
 */
public class FastJson {
    public static Tuple4<String, String, String, String> jsonRegx(String json) {
        JSONArray array = JSON.parseArray(json);
        JSONObject object = JSON.parseObject(array.get(0).toString());

//        String send_log_info = object.getString("send_log_info").replace("(none) : ", "");

        return new Tuple4<String, String, String, String>(object.getString("send_time"), object.getString("send_log_info"), object.getString("log_level"), object.getString("send_log_address"));

    }
}
